import request from "@/utils/request";


// 能耗定额标准列表
export function rationCriterionList(query) {
  return request({
    url: "/energy/ration-criterion/list",
    method: "get",
    params: query,
  });
}
// 定额标准版本号列表
export function versionList(query) {
  return request({
    url: "/energy/ration-criterion/versionList",
    method: "get",
    params: query,
  });
}


// 修改能耗定额标准
export function editVersion(data) {
  return request({
      url: '/energy/ration-criterion',
      method: 'put',
      data
  })
}

// 新增能耗定额标准
export function addVersion(data) {
  return request({
    url: "/energy/ration-criterion",
    method: "post",
    data,
  });
}

// 通过版本号获取能耗定额标准详细信息
export function getVersion(id) {
  return request({
    url: "/energy/ration-criterion/" + id,
    method: "get",
  });
}

// 审核能耗定额标准
export function auditVersion(operation,id) {
  return request({
    url: "/energy/ration-criterion/audit/"+operation+"/"+id,
    method: "patch",
  });
}


// 能耗额定标准进入公告
export function auditGoPublicity(id) {
  return request({
    url: "/energy/ration-criterion/auditGoPublicity/"+id,
    method: "patch",
  });
}
// 能耗额定标准公示确认
export function auditConfirmPublicity(id) {
  return request({
    url: "/energy/ration-criterion/auditConfirmPublicity/"+id,
    method: "patch",
  });
}
// 能耗额定标准公告驳回
export function auditRejectPublicity(id) {
  return request({
    url: "/energy/ration-criterion/auditRejectPublicity/"+id,
    method: "patch",
  });
}

// 能耗额定标准公告发布
export function auditGoPublish(id) {
  return request({
    url: "/energy/ration-criterion/auditGoPublish/"+id,
    method: "patch",
  });
}




